package com.etc.admin.dao;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;

import com.etc.entity.Order;
import com.etc.entity.Room;
@Resource
public interface OrderMapper {
    int deleteByPrimaryKey(Integer orderid);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer orderid);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);
    //得到当天时间的所有订单
    public List<Order> getAllOrderBytime();
    
  //分页
    public List<Order> getOrderByPage(@Param("start")int start, @Param("pageSize")int pageSize, @Param("content")String content);
    //统计所有条数
    public int getTotal(String content);
    public List<Order> getorderByOrderstatus(int orderstatus);
  //退房和办理入住时，根据订单id,和办理的程序需要，修改订单的状态
    public boolean updateOrderById(@Param("orderid")int orderid,@Param("orderstatus")int orderstatus);
    
    /**
     * 总订单数
     * @return
     */
    int orderCount();
    /**
     * 总营业额
     * @return
     */
    int totalTurnover();
    
    
}